package goover.unit06;

public class ThreadDemo02 {
    public static void main(String[] args){
        Thread t1 = new Thread(() ->{
            for(int i = 0; i < 10; i++){
                System.out.println(Thread.currentThread().getName() + "-" + i);
            }
        },"t1");
        Thread t2 = new Thread(() ->{
            for (int i = 0;i < 10;i++){
                System.out.println(Thread.currentThread().getName() + "-" + i);
            }
        },"t2");
        t1.setPriority(Thread.MIN_PRIORITY);
        t2.setPriority(10);
        t1.start();
        t2.start();
    }
}
